﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;

namespace Generator.Tools
{
    public partial class RegexTest : ToolsBase
    {
        public RegexTest()
        {
            InitializeComponent();
        }

        private void runToolStripMenuItem_Click(object sender, EventArgs e)
        {

            txtResult .Clear();
            Regex reg = new Regex(txtRegex.Text);
            var matches= reg.Matches(txtSource.Text);

            foreach (Match  match in matches)
            {
                txtResult.AppendText(match.Value);
                txtResult.AppendText(Environment.NewLine);
            }

        }
    }
}
